<?php
/**
 * @user:andy
 * @date:2021/8/4
 * @company:http://www.sjdphp.com
 * @desc:
 */

namespace app\admin\validate;


use think\Validate;

class AdCateValidate extends Validate
{
    protected $rule = [
        'cate_id'   => 'require|number',
        'cate_name' => 'require',
        'cate_iden' => 'require'
    ];

    protected $message = [
        'cate_id.require' => '广告位置ID不能为空',
        'cate_id.number'  => '广告位置ID格式错误',
        'cate_name.require' => '广告位置名称不能为空',
        'cate_iden.require' => '广告位置标识不能为空'
    ];

    protected $scene = [
        'add'  => ['cate_name','cate_iden'],
        'edit' => ['cate_name','cate_id','cate_iden']
    ];
}